<link rel="stylesheet" href="src/css/upload.css">
<style>
	ul,li{list-style: none;}
	p{margin: 0;}
	#answerReletion{margin-top: 20px;}
	#answerReletion li{position: relative;}
	#answerReletion img{position: absolute;top: 0;left:0;width: 30px;height:30px;cursor: pointer;}
	#answerReletion p{margin-top:20px;margin-left: 65px;line-height: 30px;}
	.zzRelationBox .zzRelationTitle{margin-top: 40px;border-bottom: 1px solid #e5e5e5;line-height: 50px;}
	.zzRelationBox .zzRelationBody{padding-top: 40px;}
</style>
<div class="box">
	<div class="box-header">
		<h3 class="box-title">新增问题</h3>
	</div>
	<div class="box-body">
		<form id="form" enctype="multipart/form-data">
			<input type="hidden" id="id">
			<div class="form-group">
				<label for="question">问题</label>
				<input id="question" type="text" class="form-control" placeholder="问题">
			</div>
			<div class="form-group">
				<label>关键字</label>
				<select id="keyWord" class="form-control select2" multiple="multiple" data-placeholder="选择关键字" style="width: 100%;"></select>
			</div>
			<div class="form-group">
				<label>更多关键字</label>
				<select id="moreKeyWord" class="form-control select2" multiple="multiple" data-placeholder="选择更多关键字" style="width: 100%;"></select>
			</div>
		</form>
		<div class="zzRelationBox">
			<h4 class="zzRelationTitle">关联答案</h4>
			<div class="zzRelationBody">
				<form class="form-inline">
					<div class="form-group">
						<label for="answerDesc">答案概述</label>
						<input id="answerDesc" type="text" class="form-control" placeholder="请输入答案概述">
					</div>
					<div class="form-group">
						<button type="button" class="btn btn-primary" onclick="search();">搜索</button>
					</div>
				</form>
				<ul id="answerReletion"></ul>
			</div>
		</div>
	</div>
	<div class="box-footer" style="width: 50%">
		<button type="button" class="btn btn-primary" onclick="submit();">确认</button>
	</div>
</div>
<div class="modal fade" tabindex="-1" role="dialog" id="addQuestion">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
				<h4 class="modal-title">关联答案</h4>
				<div id="id2" style="display: none;"></div>
			</div>
			<div class="modal-body">
				<table id="answerList" class="table table-striped table-hover" cellspacing="0" width="100%">
					<thead>
					<tr>
						<th><input type="checkbox" onchange="selectAll(this)" id="checkboxAll"></th>
						<th>答案概述</th>
						<th>语音描述</th>
						<th>创建时间</th>
						<th>修改时间</th>
					</tr>
					</thead>
				</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
				<button type="button" class="btn btn-primary" onclick="submitDesc()">确定</button>
			</div>
		</div>
	</div>
</div>

<script>
	$(function() {
		$('.select2').select2();
	})
</script>

<script src="src/js/question/question_edit.js"></script>
